//
//  CLCollectionView.h
//  Charles
//
//  Created by Charles on 2017/4/5.
//  Copyright © 2017年 charles. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface CLCollectionView : UIView<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>

@property (nonatomic, strong) UICollectionView *collectionView;

- (instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout;

- (void)registerClass:(Class)cellClass forCellWithReuseIdentifier:(NSString *)identifier;

- (void)setDelegate:(id)delegate;

- (void)setDataSource:(id)dataSource;

- (void)reloadData;

- (void)setScrollEnable:(BOOL)enable;

- (void)reloadItemsAtIndexPaths:(NSArray *)indexPaths;

- (void)setPageEnable:(BOOL)enable;

- (void)setContentOffSet:(CGPoint)offset;

- (void)setDecelerationRate:(CGFloat)rate;

- (void)setCollectionviewTag:(NSInteger)tag;

- (void)scrollToItemAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UICollectionViewScrollPosition)scrollPosition animated:(BOOL)animated;

- (nullable NSIndexPath *)clIndexPathForItemAtPoint:(CGPoint)point;

@end
